package top.z.work.module.system.controller.authorize.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.Accessors;

@Schema(description = "系统授权 - 账号登录请求 VO")
@Data
@Accessors(chain = true)
public class AuthorizeLoginVO {

    @Schema(description = "验证码Key", requiredMode = Schema.RequiredMode.REQUIRED, example = "bc0f5bdc7a4740479992908eb19f1689")
    @NotEmpty(message = "登录密码Key不能为空")
    @Size(min = 32, max = 32, message = "验证码Key长度只能是32位")
    private String key;

    @Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "qfw4")
    @NotEmpty(message = "验证码不能为空")
    @Size(min = 4, max = 4, message = "验证码长度必须为4个字符")
    private String captcha;

    @Schema(description = "登录账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "test")
    @NotEmpty(message = "登录账号不能为空")
    @Size(min = 2, max = 128, message = "登录账号长度只能是2到128位长度")
    private String username;

    @Schema(description = "登录密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "test")
    @NotEmpty(message = "登录密码不能为空")
    @Size(min = 2, max = 128, message = "登录密码长度只能是2到128位长度")
    private String password;

}
